package com.lee.boot.head.first.demo;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;


@SpringBootApplication
//@ServletComponentScan
//@EnableMongoRepositories(basePackages = {"com.lee.springboot.web.mongo.dao", "com.lee.springboot.web.mongo.dao.impl"})
//@ComponentScans(value = {@ComponentScan(basePackages = "com.lee.springboot.web.controller"),
//@ComponentScan(basePackages = "com.lee.springboot.web.util")})
//@EnableScheduling
//@EnableWebSocket
@MapperScan(basePackages = {"com.lee.boot.head.first.demo.redis.mapper", "com.lee.boot.head.first.demo.dao"})
@EnableCaching
@EnableWebSecurity
/**
 * 继承该类是为了在初始化加载资源
 * @author lee
 */
public class HeadFirstDemoApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(HeadFirstDemoApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(HeadFirstDemoApplication.class, args);
    }

}
